package com.jkgj.skykingkong;

import com.jkgj.skk.common.oauth2.EnableCustomOAuth2FeignRequestInterceptor;
import com.jkgj.skk.common.oauth2.EnableCustomUserInfoTokenService;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients;
import org.springframework.context.annotation.ImportResource;
import org.springframework.security.oauth2.config.annotation.web.configuration.EnableOAuth2Client;

@ImportResource("classpath:dubbo.xml")
@EnableDiscoveryClient
@EnableOAuth2Client
@EnableFeignClients
@EnableCustomUserInfoTokenService //  使用自定义UserInfoTokenService获取当前已认证用户
@EnableCustomOAuth2FeignRequestInterceptor // 使用自定义OAuth2FeignRequestInterceptor自动添加Authorization头
@SpringBootApplication
public class SkykingkongTmsServerApplication {

  public static void main(String[] args) {
    SpringApplication.run(SkykingkongTmsServerApplication.class, args);
  }
}
